%% This is a function handle for Vh

function output1 = VhInt(w,p1star,p2star,A,B,alpha,gamma)

global   mean sigma beta meanp nonoilgdp oilprod pmuh pmul expon;

output1 = ((1/expon)*(nonoilgdp + oilprod*(alpha + gamma*(w - meanp))).^expon + beta*A + beta*pmuh*B+...
            beta*pmuh*quad(@Ve_h,p2star,10000) + beta*pmul*quad(@Ve_l,p1star,10000)).*lognpdf(w,mean,sigma);